package hcn.protocol.brandnew.dengji.zaiyuan;

import com.fasterxml.jackson.annotation.JsonFormat;
import ctd.util.xml.jaxb.DateTimeAdapter;
import lombok.Data;
import org.atag.sysrouter.annotation.DictionaryMapping;

import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.Date;
import java.util.List;


/**
 * 获取住院患者列表-请求消息 - ODS_02090005_SUC
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "Data")
@XmlAccessorType(XmlAccessType.FIELD)
public class InHospitalAppointmentListResponse {

    /**
     * 住院患者List
     */
    @XmlElementWrapper(name = "RequestLists")
    @XmlElement(name = "RequestList")
    private List<RequestList> requestLists;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class RequestList {
        /**
         * 预约入院日期
         */
        private String visitOrganization;
        /**
         * 预约入院日期
         */
        private String visitOrganizationName;
        /**
         * 住院号
         */
        @XmlElement(name = "VisitId")
        private String visitId;

        /**
         * 业务系统患者档案ID
         */
        @XmlElement(name = "SourcePatientId")
        private String sourcePatientId;
        /**
         * 患者姓名
         */
        @XmlElement(name = "Name")
        private String name;
        /**
         * 性别代码
         */
        @XmlElement(name = "Sex")
        private String sex;
        /**
         * 年龄
         */
        @XmlElement(name = "Age")
        private String age;
        /**
         * 预约入院日期
         */
        @XmlElement(name = "AppointmentDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private String appointmentDateTime;
        /**
         * 住院证号
         */
        @XmlElement(name = "HospitalProveCode")
        private String hospitalProveCode;
        /**
         * 患者手机号码
         */
        @XmlElement(name = "PatientMobile")
        private String patientMobile;
        /**
         * 患者手机号码,为了兼容以前WHIS的错误字段
         */
        @XmlElement(name = "AatientMobile")
        private String aatientMobile;
        /**
         * 证件类型
         */
        @XmlElement(name = "IdCardCode")
        @DictionaryMapping(id = "CV02_01_101")
        private String idCardCode;
        /**
         * 证件类型号码
         */
        @XmlElement(name = "IdCard")
        private String idCard;
        /**
         * 入院目的
         */
        @XmlElement(name = "AdmissionPurpose")
        private String admissionPurpose;
        /**
         * 床位要求
         */
        @XmlElement(name = "BedRequirement")
        private String bedRequirement;
        /**
         * 收治科室代码
         */
        @XmlElement(name = "AdmissionDeptCode")
        private String admissionDeptCode;
        /**
         *收治科室名称
         */
        @XmlElement(name = "AdmissionDeptName")
        private String admissionDeptName;
        /**
         * 疾病诊断名称
         */
        @XmlElement(name = "DiagnoseName")
        private String diagnoseName;
        /**
         * 安排住院日期
         */
        @XmlElement(name = "ArrangeDate")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private String arrangeDate;
    }


}
